const Service = require('egg').Service;
const fs = require('fs');
const path = require('path');
module.exports = app => {
  
  //创建
  const publicPath = path.join(app.config.baseDir, `app/public/fileSystem`);
  if(fs.existsSync(publicPath)) {
    fs.mkdirSync(publicPath);
  }

  return class fileSystemService extends app.Service {

    /**
     * @description 文件夹详情信息及列表向相关
     * @author xiezuobing[948466]<435321508@qq.com>
     * @param {any} [path=publicPath] 
     */
    async detail(path = publicPath){

    }
    
    /**
     * @description 创造文件夹
     * @author xiezuobing[948466]<435321508@qq.com>
     * @param {any} [path=publicPath] 
     */
    async create(path = publicPath){

    }
    
    /**
     * @description 删除
     * @author xiezuobing[948466]<435321508@qq.com>
     * @param {any} [path=publicPath] 
     */
    async delete(path = publicPath) {

    }
    
  }

}